<?php

namespace App\LeShua;

class Sign
{
    public static function sign($data, $key)
    {
        ksort($data);
        $str = '';
        foreach ($data as $k => $v) {
            $str .= $k . '=' . $v . '&';
        }
        $str .= 'key=' . $key;

        return strtoupper(md5($str));
    }
}
